<template>
  <div>Переадресация...</div>
</template>

<script setup lang="ts">
import { useUserManagerStore } from '~/stores/userManagerStore'

onMounted(() => {
  const userManagerStore = useUserManagerStore()
  userManagerStore.userManager
    .signInRedirectCallback()
    .then(() => {
      const redirectUrl = window.localStorage.getItem('contactsADRedirectUrl')
      window.location.replace(redirectUrl || '/')
    })
    .catch((err) => console.error(err))
})
</script>

<style scoped></style>
